import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Index',
    component: Index,
    children: [
      {
        path: '/',
        name: 'Home',
        component: () => import( /* webpackChunkName: "about" */ '../views/Home/Home.vue'),
      },
      {
        path: 'cooperation',
        name: 'Cooperation',
        component: () => import( /* webpackChunkName: "about" */ '../views/Cooperation/Cooperation.vue')
      },
      {
        path: 'job',
        name: 'Job',
        component: () => import( /* webpackChunkName: "about" */ '../views/Job/Job.vue')
      },
      {
        path: 'works',
        name: 'Works',
        component: () => import( /* webpackChunkName: "about" */ '../views/Works/Works.vue')
      },
      {
        path: 'school',
        name: 'School',
        component: () => import( /* webpackChunkName: "school" */ '../components/School/School.vue')
      },
      {
        path: 'teachers',
        name: 'Teachers',
        component: () => import( /* webpackChunkName: "teachers" */ '../components/Teachers/Teachers.vue')
      },
      {
        path: 'about',
        name: 'About',
        component: () => import( /* webpackChunkName: "teachers" */ '../components/About/About.vue')
      },
      {
        path: 'web',
        name: 'web',
        redirect: '/h5',
        component: () => import( /* webpackChunkName: "web" */ '../views/web/Web.vue'),
        children: [{
            path: '/h5',
            name: 'h5',
            component: () => import( /* webpackChunkName: "h5" */ '../views/web/h5/H5.vue')
          },
          {
            path: '/python',
            name: 'python',
            component: () => import( /* webpackChunkName: "python" */ '../views/web/python/Python.vue')
          },
          {
            path: '/ui',
            name: 'ui',
            component: () => import( /* webpackChunkName: "ui" */ '../views/web/ui/Ui.vue')
          },
          {
            path: '/java',
            name: 'java',
            component: () => import( /* webpackChunkName: "java" */ '../views/web/java/Java.vue')
          }
        ]
      },
      {
        path: '/news',
        name: 'News',
        component: () => import( /* webpackChunkName: "about" */ '../views/News/News.vue')
      }
    ],

  },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router